package lab01;

public class Test12 {
    public static void main(String[] args) {
        int count=0;
        for (int i = 2; i <= 100; i++) {

            if (isSushu(i)) {

                System.out.print("\t"+i);
                count++;
                if (count%5==0){
                    System.out.println();
                }

            }
        }
    }

    public static boolean isSushu(int num) {

        int sqrt = (int) Math.sqrt(num) + 1;
        for (int i = 2; i < sqrt; i++) {
            if (num % i == 0) {
                return false;
            }
        }
        return true;
    }
}



